package controller;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import service.RunThread;

/**
 * Servlet implementation class CrawlerOlo
 */
public class CrawlerOlo extends HttpServlet {
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
		// TODO Auto-generated method stub
		new RunThread().start();
		response.getWriter().println("Start Crawler olo.vn!");
		
	}
	
	public static void main(String[] args) {
		String url = "http://www.olo.vn/ban-nha-mat-tiem-duong-ngo-thi-thu-minh-p-2-q-tan-binh_1108730.html";
		if (url.contains("olo.vn")) {
			System.out.println("Have contain");
		} else {
			System.out.println("no contain");
		}
	}
}
